package cn.jinzhu.resilience4j;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class HelloServerFallBackFactory implements FallbackFactory<HelloSevice> {
    @Override
    public HelloSevice create(Throwable throwable) {
        return new HelloSevice() {
            @Override
            public String hello() {
                return "error"+throwable.getMessage();
            }


        };
    }
}
